/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package models;

import java.util.Date;

/**
 *
 * @author dybvik
 */
public class StudyProgram {

    private int studyProgramID;
    private int studyProgramCode;
    private String name;
    private Date approved;
    private Date lastRevised;
    private String approvedBy;
    private boolean isNKR;
    private Department department;
    private boolean editable = false;
    private boolean deleteFlag = false;

    public StudyProgram() {
        this.department = new Department();
    }

    public StudyProgram(int studyProgramID, int studyProgramCode, String name, Date approved, Date lastRevised, String approvedBy, boolean isNKR, Department department) {
        this.studyProgramID = studyProgramID;
        this.studyProgramCode = studyProgramCode;
        this.name = name;
        this.approved = approved;
        this.lastRevised = lastRevised;
        this.approvedBy = approvedBy;
        this.isNKR = isNKR;
        this.department = department;
   }
    
     public StudyProgram(int studyProgramID, int studyProgramCode, String name, Date approved, Date lastRevised, String approvedBy, boolean isNKR) {
        this.studyProgramID = studyProgramID;
        this.studyProgramCode = studyProgramCode;
        this.name = name;
        this.approved = approved;
        this.lastRevised = lastRevised;
        this.approvedBy = approvedBy;
        this.isNKR = isNKR;
   }

    public StudyProgram(int studyProgramID, int studyProgramCode, String studyProgramName, Date approved, Date lastRevised, String approvedBy) {
        this.studyProgramID = studyProgramID;
        this.studyProgramCode = studyProgramCode;
        this.name = studyProgramName;
        this.approved = approved;
        this.lastRevised = lastRevised;
        this.approvedBy = approvedBy;
    }

    public int getStudyProgramCode() {
        return studyProgramCode;
    }

    public void setStudyProgramCode(int studyProgramCode) {
        this.studyProgramCode = studyProgramCode;
    }

    public Date getApproved() {
        return approved;
    }

    public void setApproved(Date approved) {
        this.approved = approved;
    }

    public String getApprovedBy() {
        return approvedBy;
    }

    public void setApprovedBy(String approvedBy) {
        this.approvedBy = approvedBy;
    }

    public int getStudyProgramID() {
        return studyProgramID;
    }

    public void setStudyProgramID(int studyProgramID) {
        this.studyProgramID = studyProgramID;
    }

    public Department getDepartment() {
        return department;
    }

    public void setDepartment(Department department) {
        this.department = department;
    }

    public boolean isIsNKR() {
        return isNKR;
    }

    public void setIsNKR(boolean isNKR) {
        this.isNKR = isNKR;
    }

    public int isIsNKRAsInt() {
        if(isNKR) return 1;
        else return 0;
    }

    public void setIsNKRFromInt(int oneOrZero) {
        if(oneOrZero>0) this.isNKR = true;
        else this.isNKR = false;
    }

    public Date getLastRevised() {
        return lastRevised;
    }

    public void setLastRevised(Date lastRevised) {
        this.lastRevised = lastRevised;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public boolean isEditable() {
        return editable;
    }

    public void setEditable(boolean editable) {
        this.editable = editable;
    }

    public boolean isDeleteFlag() {
        return deleteFlag;
    }

    public void setDeleteFlag(boolean deleteFlag) {
        this.deleteFlag = deleteFlag;
    }

}
